package com.itheima.test;

/**
 * @Author 王加鑫
 * @Date 2021/4/19 10:44
 * @Version 1.0
 * For循环的倒叙
 */
public class ForTest02 {
    public static void main(String[] args) {
        for (int i = 100; i > 0 ; i--) {
            if(i % 2 == 0){
                System.out.println("100以内的偶数有:"+i);
            }

        }

        System.out.println("============================");

        for (int i = 100; i > 0 ; i-=2) {
            System.out.println("100以内的偶数有:"+i);

        }

        System.out.println("=============================");

        for (int i = 2; i <=100 ; i+=2) {
            System.out.println("100以内的偶数有:"+i);

        }
    }
}
